{% extends "org_base.html" %}

{% block title %}机构首页{% endblock %}

{% block main %}
     <div style="height: 15px;"></div>

    <section>
        <div class="wp org_all_course_title_use">
            <div class="org_all_course_title">
                    全部课程
            </div>
            <div class="org_all_course_detail clearfix">
                {% for course in all_courses %}
                    <div class="detail_recommand_box fl"
                         style="margin: 20px 0px 0 20px;box-shadow: 0 8px 16px 0 rgba(28,31,33,.1);width: 275px;height: 270px;left: -15px;bottom: 12px;">
                        <div class="index_new_course_box"
                             style="height: 100%;width: 100%;margin: 0;padding: 0">
                            <a href="{% url 'course:detail' course.id %}"><img
                                    src="{{ MEDIA_URL }}{{ course.image }}"
                                    alt=""
                                    id="index_newcourse_img"></a>
                            <div id="index_new_course_title_box">{{ course.name }}</div>
                            <div id="index_new_course_desc_box">{{ course.get_degree_display }}&nbsp;&nbsp;&nbsp;&nbsp;学习人数:&nbsp;{{ course.students }}人&nbsp;&nbsp;&nbsp;&nbsp;时长:&nbsp;{{ course.learn_times }}</div>
                            <div id="index_new_course_price_box">{% if course.price == 0 %}免费
                                {% else %}{{ course.price }}¥{% endif %}</div>
                        </div>
                    </div>
                {% endfor %}
            </div>
        </div>
    </section>

    <section>
            <div class="wp org_all_course_title_use">
                <div class="org_all_course_title">
                        全部教师
                </div>
                <div class="org_all_course_detail clearfix">
                    {% for teacher in all_teacher %}
                    <div class="singo_tea_box fl">
                        <a href="{% url 'org:teacher_detail' teacher.id %}"><img src="{{ MEDIA_URL }}{{ teacher.image }}" alt=""></a>
                        <div class="top">{{ teacher.name }}</div>
                        <div class="center">
                            {{ teacher.work_position }}
                        </div>
                    </div>
                    {% endfor %}
                </div>
            </div>
    </section>

    <section>
            <div class="wp org_all_course_title_use">
                <div class="org_all_course_title">
                        详细介绍
                </div>
                <div class="org_all_course_detail clearfix">
                    <div style="height: 20px;"></div>
                    <div class="org_detail_text ">
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{% autoescape off %}{{ course_org.desc }}{% endautoescape %}
                    </div>
                    <div style="height: 20px;"></div>
                </div>
            </div>
    </section>

    <div style="height: 50px"></div>
{% endblock %}

{% block footer %}
{% endblock %}